package cn.fl.ref.fncprjfstpyinfo.service;

import java.util.List;

import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.ref.fncprjfstpyinfo.vo.FncPrjDetailVO;
import cn.fl.ref.fncprjfstpyinfo.vo.FncPrjFstpyInfoVO;
import fl.flow.facade.flow.dto.FlowStartParamsDTO;
import fl.ref.fncprjfstpyinfo.condition.FncPrjFstpyInfoQueryCondition;

/**
 * @Description: 融资项目首付款信息
 */
public interface IFncPrjFstpyInfoService {

	/**
	 * 获取唯一对象
	 * 
	 * @param id
	 *            主键
	 * @return 对象DTO
	 */
	public FncPrjFstpyInfoVO selectById(Long id) throws BaseException;

	/**
	 * 根据项目ID、融资方案计费参数ID ScmChrgId查询对象
	 * @param condition
	 * @return
	 */
	public FncPrjFstpyInfoVO selectByScmChrgId(FncPrjFstpyInfoQueryCondition condition) throws BaseException;

	/**
	 * 新增
	 * 
	 * @param entity
	 * @return
	 */
	public Long add(FncPrjFstpyInfoVO entity) throws BaseException;

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public boolean removeById(Long id) throws BaseException;

	/**
	 * 修改
	 * 
	 * @param entity
	 * @return
	 */
	public boolean modify(FncPrjDetailVO entity) throws BaseException;
	
	/**
	 * 修改 项目详细信息
	 * 
	 * @param entity
	 * @return
	 */
	public boolean modifyFncPrjDetail(FncPrjDetailVO entity) throws BaseException;

	/**
	 * 分页查询所有
	 * 
	 * @param page
	 * @return
	 */
	public Pager searchListPage(Pager page) throws BaseException;

	/**
	 * 条件查询所有
	 * 
	 * @param condition
	 * @return 集合
	 */
	public List<FncPrjFstpyInfoVO> searchList(FncPrjFstpyInfoQueryCondition condition);

	/**
	 * 根据项目编号查询详细信息
	 * @param fncPrjId
	 * @return
	 * @throws BaseException
	 */
	public FncPrjDetailVO selectByFncPrjId(Long fncPrjId) throws BaseException;
	
	/**
	 * 项目信息查询列表
	 * @param page
	 * @return
	 * @throws BaseException
	 */
	public Pager selectFncPrjDetailListPage(Pager page) throws BaseException;
	
	/**
	 * 数据字典项
	 * 
	 * @param grpCd
	 * @return
	 * @throws BaseException
	 */
	public List<KeyValueVO> getKvList(String grpCd) throws BaseException;


	/**
	 * 取id、name 转换成key-value形式
	 * @param list
	 * @param keyName
	 * @param valueName
	 * @return
	 * @throws BaseException
	 */
	public <E> List<KeyValueVO> transformToKeyValue(List<E> list, String className, String keyName, String valueName) throws BaseException;

	/**
	 * 根据用户ID和业务主键等参数启动流程
	 * @param flowStartParamsDTO 启动参数
	 */
	public DataResultDTO addFlowStart(FlowStartParamsDTO flowStartParamsDTO)throws BaseException;
	
	/**
	 * 是 、 否 、 是/否
	 * @return
	 * @throws BaseException
	 */
	public List<KeyValueVO> searchWthrKVList()throws BaseException;
	
	/**
	 * 获取保证金所有之和（计入首付）
	 * @param qc
	 * @return
	 */
	public double getFncPrjFstpyBondAll(FncPrjFstpyInfoQueryCondition qc);
}
